/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.goods.dao.ZtCardOrderDao;
import com.jeesite.modules.goods.entity.ZtCardOrder;

/**
 * 测试数据Service
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
@Transactional(readOnly = true)
public class ZtCardOrderService extends CrudService<ZtCardOrderDao, ZtCardOrder> {

	/**
	 * 获取单条数据
	 * 
	 * @param testData
	 * @return
	 */
	@Override
	public ZtCardOrder get(ZtCardOrder ztCardOrder) {
		ZtCardOrder entity = super.get(ztCardOrder);
		if (entity == null) {
			entity = new ZtCardOrder();
		}
		return entity;
	}

	public ZtCardOrder getByOrder(ZtCardOrder ztCardOrder) {
		return dao.getByOrder(ztCardOrder);
	}
	
	public ZtCardOrder getCardOrder(ZtCardOrder ztCardOrder) {
		return dao.getCardOrder(ztCardOrder);
	}
	
	
	public List<ZtCardOrder> findMh(ZtCardOrder ztCardOrder) {
		return dao.findMh(ztCardOrder);
	}
	public List<ZtCardOrder> findwc(ZtCardOrder ztCardOrder) {
		return dao.findwc(ztCardOrder);
	}
	public List<ZtCardOrder> findAllCardOrder(ZtCardOrder ztCardOrder) {
		return dao.findAllCardOrder(ztCardOrder);
	}
	
	public List<ZtCardOrder> findGhMh(ZtCardOrder ztCardOrder) {
		return dao.findGhMh(ztCardOrder);
	}
	
	
	public List<ZtCardOrder> findListByNew(ZtCardOrder ztCardOrder) {
		return dao.findListByNew(ztCardOrder);
	}

	/**
	 * 查询分页数据
	 * 
	 * @param page
	 *            分页对象
	 * @param testData
	 * @return
	 */
	@Override
	public Page<ZtCardOrder> findPage(Page<ZtCardOrder> page, ZtCardOrder ztCardOrder) {
		return super.findPage(page, ztCardOrder);
	}

	/**
	 * 保存数据（插入或更新）
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void save(ZtCardOrder ztCardOrder) {
		super.save(ztCardOrder);

	}

	/**
	 * 更新状态
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void updateStatus(ZtCardOrder ztCardOrder) {
		super.updateStatus(ztCardOrder);
	}

	/**
	 * 删除数据
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void delete(ZtCardOrder ztCardOrder) {
		super.delete(ztCardOrder);
	}
	
	
	@Transactional(readOnly = false)
	public void updateCardOrderstatus(ZtCardOrder ztCardOrder) {
		dao.updateCardOrderstatus(ztCardOrder);
	}
	
	

}